<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>CK宠物狗狗 领养</title>
	<jsp:include page="top_utils.jsp"></jsp:include>
	<link rel="stylesheet" type="text/css" href="${pageContext.request.contextPath }/css/ly.css"/>
</head>
<body>
	<!-- 头部-->
	<div class="headnav">
		<div class="topBar">
			<div class="topBarL">
				<jsp:include page="logo.jsp"></jsp:include>
				<div class="nav">
					<ul>
						<li >
							<a href="${pageContext.request.contextPath }/">首页</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath }/news/">新闻</a>
						</li>
						<li class="on">
							<a href="${pageContext.request.contextPath }/adopt/">领养</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath }/knowledge/">知识</a>
						</li>
						<li>
							<a href="${pageContext.request.contextPath }/dangdang/index.html">商城</a>
						</li>
					</ul>
				</div>
			</div>

			<jsp:include page="topBarR.jsp"></jsp:include>
		</div>
	</div>

	<!-- 中间内容-->
	<div class="wp">
		<div class="contents"> 
			<!--中间顶部-->
			<div class="con-top">
				<div class="pt">
					<div class="l">
						<a href="${pageContext.request.contextPath }/" class="nvhm" title="首页">宠物领养网 Petly.net</a>
						<em>-</em>
						<a href="${pageContext.request.contextPath }/adopt">领养</a>
					</div>
					<div class="r">
						<dd style="float: right;">
				          <div id="anc">
				            <jsp:include page="gonggao.jsp"></jsp:include>
				          </div>
				        </dd>
					</div>
				</div>
				
				<jsp:include page="website_pet.jsp"></jsp:include>
			</div>

			<!-- 中间内容 -->
			<div class="inner">
				<!--左边 -->
				<div class="inner-left">
					<!-- 中间内容  顶部 -->
					<div class="inner-l-top">
						<div class="inner-pic">
							<a href="">
								<img src="../images/client/ly/top-1.jpg" >
							</a>
						</div>
						<div class="inner-word">
							<div class="word-t" id="word-t">
								
							</div>
							<div class="word-b" >
								<ul id="word-b">
									
								</ul>
							</div>
						</div>
					</div>
					
					<!-- 中间内容  中部-->
					<div class="inner-l-midle">
						<div class="midle-t">
							<div class="title">
								<h2>
									<a href="" style="">宠物领养</a>
								</h2>
							</div>
							<div class="words">
								<!-- 领养卖家的table -->
								<table class="tb">
									<tbody>
										<!-- 第一行 -->
										<tr>
											<td class="tb-td" width="32.9%">
												<div class="td-pic" style="width: 60px;">
													<a href="">
														<img src="../images/client/ly/dog-1.png">
													</a>
												</div>
												<dl class="td-word" style="margin-left: 60px;">
													<dt>
														<a href="">北京宠物领养</a>
													</dt>
													<dd>                  
														<p class="xg2">北京免费领养宠物的网站</p>
                  									</dd>
                  									<dd><em>主题: 4868</em>, <em>帖数: 7226</em></dd>
                  									<dd>
									                  <a href="">最后发表: 
									                  	<span title="2017-1-17 03:29">6&nbsp;小时前</span>
									                  </a> 
									                </dd>
												</dl>
											</td>
											<td class="tb-td" width="32.9%">
												<div class="td-pic" style="width: 60px;">
													<a href="">
														<img src="../images/client/ly/dog-1.png">
													</a>
												</div>
												<dl class="td-word" style="margin-left: 60px;">
													<dt>
														<a href="">北京宠物领养</a>
													</dt>
													<dd>                  
														<p class="xg2">北京免费领养宠物的网站</p>
                  									</dd>
                  									<dd><em>主题: 4868</em>, <em>帖数: 7226</em></dd>
                  									<dd>
									                  <a href="">最后发表: 
									                  	<span title="2017-1-17 03:29">6&nbsp;小时前</span>
									                  </a> 
									                </dd>
												</dl>
											</td>
											<td class="tb-td" width="32.9%">
												<div class="td-pic" style="width: 60px;">
													<a href="">
														<img src="../images/client/ly/dog-1.png">
													</a>
												</div>
												<dl class="td-word" style="margin-left: 60px;">
													<dt>
														<a href="">北京宠物领养</a>
													</dt>
													<dd>                  
														<p class="xg2">北京免费领养宠物的网站</p>
                  									</dd>
                  									<dd><em>主题: 4868</em>, <em>帖数: 7226</em></dd>
                  									<dd>
									                  <a href="">最后发表: 
									                  	<span title="2017-1-17 03:29">6&nbsp;小时前</span>
									                  </a> 
									                </dd>
												</dl>
											</td>
										</tr>

										<!-- 第二行 -->
										<tr>
											<td class="tb-td" width="32.9%">
												<div class="td-pic" style="width: 60px;">
													<a href="">
														<img src="../images/client/ly/dog-1.png">
													</a>
												</div>
												<dl class="td-word" style="margin-left: 60px;">
													<dt>
														<a href="">北京宠物领养</a>
													</dt>
													<dd>                  
														<p class="xg2">北京免费领养宠物的网站</p>
                  									</dd>
                  									<dd><em>主题: 4868</em>, <em>帖数: 7226</em></dd>
                  									<dd>
									                  <a href="">最后发表: 
									                  	<span title="2017-1-17 03:29">6&nbsp;小时前</span>
									                  </a> 
									                </dd>
												</dl>
											</td>
											<td class="tb-td" width="32.9%">
												<div class="td-pic" style="width: 60px;">
													<a href="">
														<img src="../images/client/ly/dog-1.png">
													</a>
												</div>
												<dl class="td-word" style="margin-left: 60px;">
													<dt>
														<a href="">北京宠物领养</a>
													</dt>
													<dd>                  
														<p class="xg2">北京免费领养宠物的网站</p>
                  									</dd>
                  									<dd><em>主题: 4868</em>, <em>帖数: 7226</em></dd>
                  									<dd>
									                  <a href="">最后发表: 
									                  	<span title="2017-1-17 03:29">6&nbsp;小时前</span>
									                  </a> 
									                </dd>
												</dl>
											</td>
											<td class="tb-td" width="32.9%">
												<div class="td-pic" style="width: 60px;">
													<a href="">
														<img src="../images/client/ly/dog-1.png">
													</a>
												</div>
												<dl class="td-word" style="margin-left: 60px;">
													<dt>
														<a href="">北京宠物领养</a>
													</dt>
													<dd>                  
														<p class="xg2">北京免费领养宠物的网站</p>
                  									</dd>
                  									<dd><em>主题: 4868</em>, <em>帖数: 7226</em></dd>
                  									<dd>
									                  <a href="">最后发表: 
									                  	<span title="2017-1-17 03:29">6&nbsp;小时前</span>
									                  </a> 
									                </dd>
												</dl>
											</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>

						<!-- 宠物组织 -->
						<div class="midle-m">
							<div class="title">
								<h2>
									<a href="" style="">宠物组织</a>
								</h2>
							</div>	
							<div class="zuzhi">
								<table>
									<tbody>
										<tr>
											<td>
												<a href="">
													<img src="../images/client/ly/zh-1.gif">
												</a>
											</td>
											<td>
												<h2>
													<a class="zzword" href="">小动物保护组织</a>
												</h2>
                                				<p class="xg2">小动物组织专版</p>
                                			</td>
										</tr>
									</tbody>
								</table>
							</div>
						</div>

						<div class="midle-b">
							<h3>
								<strong>
									<a href="" style="color: #333333;">在线会员 - 118人</a>
								</strong>
							</h3>
						</div>

						<div class="adminstyle">
							<img src="../images/client/ly/adminlogo.gif">
							管理员 &nbsp; &nbsp; &nbsp;---&nbsp; &nbsp; &nbsp;
							<a class="admin1" href="">厉锋遥</a>
							&nbsp; &nbsp; &nbsp;---&nbsp; &nbsp; &nbsp;
							<a class="admin1" href="">小巫女</a>
						</div>
					</div>
				</div>

				<!--右边-->
				<div class="inner-right">
					<div class="ad-1">
						<a href="" target="_blank">
							<img src="../images/client/xw/ad-1.jpg" width="260">
						</a>
					</div>
					<jsp:include page="remenyuedu.jsp"></jsp:include>
					<!-- 广告 -->
					<div class="ad-1">
						<a href="" target="_blank">
							<img src="../images/client/zs/ad-1.jpg" width="260">
						</a>
					</div>
				</div>
			</div>
		</div>
	</div>
	
	<jsp:include page="footer.jsp"></jsp:include>
</body>
<script>
	var index = layer.load(2, {time: 20000}); //缓冲3秒
	window.onload=function (){
		/*
			<li>
				<a href="">想领养一只幼犬给父亲作伴</a>
			</li>
		*/
		//最新领养
			$.post("/dogstore/adopt/zxadopt",
				{
					size:5
				},
				function (result){
					
					if(result != null){
						var list = JSON.parse(result);
						$("#word-b").html("");
						layer.close(index);
						$.each(list,function(i,item){
							//console.log(item.title);
							$("#word-b").append(""+
								"<li class='kx-li'>"+
						           "<a href='/dogstore/adopt/detail?key="+item.id+"'>"+item.title+"</a>"+
						        "</li>"
							);
						});	
					}else{
						layer.close(index);
						layer.msg("最新领养读取出错! 找prince!",{shift:6});
					}
				}
			);	
			
			
			/*
				<ul>
					<li class="cl">
						<h3>
							<a href="" title="2岁母猫求主人,已绝育" target="_blank">2岁母猫求主人,已绝育</a>
						</h3>
						<p>
							我们家猫咪是成年猫咪，希望找个爱猫朋友领养喵喵[握手]（猫咪资料：成年母猫猫，大概... <a href="">[查看]</a>
						</p>
					</li>
				</ul>
			*/
			//最最新领养   头条
			$.post("/dogstore/adopt/zxadopt",
				{
					size:1
				},
				function (result){
					
					if(result != null){
						var list = JSON.parse(result);
						$("#word-t").html("");
						$.each(list,function(i,item){
							$("#word-t").html(""+
								"<ul>"+
									"<li class='cl'>"+
										"<h3>"+
											"<a href='/dogstore/adopt/detail?key="+item.id+"' title='"+item.title+"' target='_blank'>"+item.title+"</a>"+
										"</h3>"+
										"<p>"+
											""+item.content+"<a href='/dogstore/adopt/detail?key="+item.id+"'>[查看]</a>"+
										"</p>"+
									"</li>"+
								"</ul>"
							);
						});	
					}else{
						layer.msg("领养头条读取出错! 找prince!",{shift:6});
					}
				}
			);	
	};
</script>
</html>